﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;

namespace PHMEE
{
    /// <summary>
    /// 轴承库
    /// </summary>
    public class BearLib : FullAuditedAggregateRoot<Guid>
    {
        protected BearLib()
        {

        }
        public BearLib(Guid id, string model) : base(id)
        {
            SetModel(model);
        }

        /// <summary>
        /// 型号
        /// </summary>
        public string Model { get; private set; }

        /// <summary>
        /// 滚子数
        /// </summary>
        public double NB { get; set; }

        /// <summary>
        /// 外圈故障特征频率
        /// </summary>
        public double BPFO { get; set; }

        /// <summary>
        /// 内圈故障特征频率
        /// </summary>
        public double BPFI { get; set; }

        /// <summary>
        /// 保持架故障特征频率
        /// </summary>
        public double FTFI { get; set; }

        /// <summary>
        /// 滚动体故障特征频率
        /// </summary>
        public double BSF { get; set; }

        /// <summary>
        /// 接触角
        /// </summary>
        public double ContactAngle { get; set; }

        public int BearFactoryId { get; set; }

        public BearLib SetModel(string model)
        {
            Model = Check.NotNullOrEmpty(model, nameof(model), BearConst.MaxLibModelLength);
            return this;
        }

    }
}
